package design.pattern.Strategy;

public class MainTest {

    public static void main(String[] args) {

        //run("BMWX5");
        runStrategy("BWM320");

    }


    public static void  runStrategy(String type){
        Run.getStrategy(type).run();
    }
    public static void run(String type){
            if (type.equals("BWM320")){
                System.out.println("省略10000行代码");
                System.out.println("BMW320 低速行驶");
            }else if (type.equals("BWM523")){
                System.out.println("省略10000行代码");
                System.out.println("BMW320 中速行驶");
            }else if (type.equals("BMWX5")){
                System.out.println("省略10000行代码");
                System.out.println("BMW320 高速行驶");
            }
    }
}
